# function to extract quantities of interest
# 	extract: mean, median and 2.5,5,95,97.5 percentiles
# 	data type supported: vector
# By Fabien Cottier, June 2018

extractQI<-function(vector){

	# extract quantity of interest
	meanX <- mean(vector)
	medianX <- median(vector)
	qXp95 <- quantile(vector,probs=c(.025,.975))
	qXp90 <- quantile(vector,probs=c(.05,.95))

	# return vector of QI
	rvec<-c(meanX,medianX,qXp95[1],qXp90[1],qXp90[2],qXp95[2])
	return(rvec)

}